﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Tong;
public partial class Use_Use_ChangeMyPassWord : System.Web.UI.Page
{
    /// <summary>
    /// 用户的id 
    /// </summary>
    string id;
    /// <summary>
    /// 
    /// 用户名
    /// </summary>
    string use;
    /// <summary>
    /// 数据操作通用类 实例 TextData
    /// </summary> 
    public TongUse TextData = new TongUse();

    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            use = Request.Cookies["admin"].Value;//得到修改用户的 用戶名

            string chpwd = Request.QueryString["chpwd"].ToString();//修改過的密碼
           
            if (use != "" && chpwd != "")
            {

                TextData.SqlDataSave("Update [Use] Set pwd = '" + TextData.SHA1Sign(chpwd) + "' where uid  ='" + use+"'");

                Response.Write("用户" + use + "的数据成功更新");
            }
       }
        catch
        {
            Response.Write("密码数据更新失敗");
            
        }
    }
}
